using System;
using System.Data;
using System.Data.OracleClient;

namespace uk.co.tonyditchfield.tort.utility.conversion
{
    internal class DbTypeMapping
    {
        internal DbTypeMapping(Type nativeType, DbType dbType, SqlDbType sqlDbType, OracleType oracleType)
        {
            this.nativeType = nativeType;
            this.dbType = dbType;
            this.sqlDbType = sqlDbType;
            this.oracleType = oracleType;

            this.dbTypeSet = true;
            this.sqlDbTypeSet = true;
            this.oracleDbTypeSet = true;
            this.nativeTypeSet = true;
        }

        internal DbTypeMapping(Type nativeType, OracleType oracleType)
        {
            this.nativeType = nativeType;
            this.oracleType = oracleType;

            this.nativeTypeSet = true;
            this.oracleDbTypeSet = true;
        }

        internal DbTypeMapping(Type nativeType, DbType dbType, OracleType oracleType)
        {
            this.nativeType = nativeType;
            this.dbType = dbType;
            this.oracleType = oracleType;

            this.nativeTypeSet = true;
            this.dbTypeSet = true;
            this.oracleDbTypeSet = true;
        }

        private Type nativeType = null;
        internal Type NativeType
        {
            get { return nativeType; }
        }
        private DbType dbType;
        internal DbType DbType
        {
            get { return dbType; }
        }
        private SqlDbType sqlDbType;
        internal SqlDbType SqlDbType
        {
            get { return sqlDbType; }
        }
        private OracleType oracleType;
        internal OracleType OracleType
        {
            get { return oracleType; }
        }

        private bool dbTypeSet;
        internal bool DbTypeSet
        {
            get { return dbTypeSet; }
        }
        private bool sqlDbTypeSet;
        internal bool SqlDbTypeSet
        {
            get { return sqlDbTypeSet; }
        }
        private bool oracleDbTypeSet;
        internal bool OracleDbTypeSet
        {
            get { return oracleDbTypeSet; }
        }

        private bool nativeTypeSet;
        internal bool NativeTypeSet
        {
            get { return nativeTypeSet; }
        }

    }
}